***load data

use "${path}\data\googletrends\googletrends_ready.dta", clear 

***Online Appendix Tables

cd "${path}\output\tables"

***Table A.XVIII

eststo: reg avg_Evo evo_score i.state i.year, vce(cluster state) baselevels
estadd ysumm

eststo: reg avg_Etheory  evo_score i.state i.year, vce(cluster state)
estadd ysumm

eststo: reg avg_Eprocess  evo_score i.state i.year, vce(cluster state)
estadd ysumm

eststo: reg avg_Darwin evo_score i.state i.year, vce(cluster state) baselevels
estadd ysumm

eststo: reg avg_Nselection  evo_score i.state i.year, vce(cluster state)
estadd ysumm

eststo: reg avg_Creat  evo_score i.state i.year, vce(cluster state)
estadd ysumm

eststo: reg avg_ID  evo_score i.state i.year, vce(cluster state)
estadd ysumm

eststo: reg avg_avggoogle  evo_score i.state i.year, vce(cluster state)
estadd ysumm

eststo: reg avg_avggoogle2  evo_score i.state i.year, vce(cluster state)
estadd ysumm


esttab using googletrends.tex, replace keep(evo_score) b(3) se(3) fragment  nonotes  label /// 
   stats(ymean ysd  r2_a N, labels ("Mean of Dep. Var." "Std. Dev. of Dep. Var." "Adj. R-squared" "Observations") fmt(2 2 3 %9.0fc))  /// 
 mgroups("Google Searches of the Following Words:" "Average:", pattern(1 0 0 0 0 0 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) /// 
mlabels("\specialcell{Evolution}" "\specialcell{Evolution \\ Theory}" "\specialcell{Evolutionary \\ Process}" "\specialcell{Darwin}" "\specialcell{Natural \\ Selection}" "\specialcell{Creationism}" "\specialcell{Intelligent \\ Design}" "\specialcell{Sign \\ Adjusted}" "\specialcell{No Sign \\ Adjusted}") star(* 0.1 ** 0.05 *** 0.01) /// 
indicate("State FEs = *state" "Year FEs = *year", labels("YES" "NO"))
eststo clear


